/*!
 *  \file       SimpleMatrix.hpp
 *  \brief      Definizione della classe \c SimpleMatrix
 *  \author     Davide Scola <S2299453@studenti.unige.it>
 *  \author	Minetti Alberto <S3064777@studenti.unige.it>
 *  \version    1.0
 *
 */

#ifndef _SIMPLE_MATRIX_H
#define _SIMPLE_MATRIX_H

/*!
 *  \brief      Definizione della classe \c SimpleMatrix
 */
template< class tType > class SimpleMatrix {
  public:
    typedef void ( *callback_t )( SimpleMatrix & );
    
    SimpleMatrix( SimpleMatrix const& );
    SimpleMatrix( unsigned int, unsigned int );
    
    unsigned int const& getRows( void ) const;
    unsigned int const& getCols( void ) const;
    
    SimpleMatrix& operator= ( SimpleMatrix const& );
    tType& operator() ( unsigned int, unsigned int );
    tType  operator() ( unsigned int, unsigned int ) const;
    
    tType findMax( void ) const;
    std::vector< tType > & rowAt( unsigned int, std::vector< tType > & );
    std::vector< tType > & colAt( unsigned int, std::vector< tType > & );
    void assignRow( unsigned int, const std::vector< tType > & );
    void assignCol( unsigned int, const std::vector< tType > & );
    void applyOperator( const callback_t );
  
  protected:
    unsigned int rows_, cols_;
    std::vector< tType > data_;
};

#endif              /* _SIMPLE_MATRIX_H */
